package com.iqismart.shorturl.exception;

/**
 * @Description
 * @Auther sty
 * @createTime 2019/10/14 01:39
 */
public enum GlobalExceptionType {
    MEET_DELETE_FORBIDDEN(20101, "删约会议失败", "请确认有相应权限"),
    MEET_UPDATE_FORBIDDEN(20101, "更新会议失败", "请确认有相应权限"),
    MEET_NOT_FOUND(20102, "会议不存在"),
    MEET_APPLY_NOT_FOUND(20103, "会议申请不存在"),
    MEET_APPLY_UPDATE_FORBIDDEN(20104, "更新会议申请失败", "请确认有相应权限"),
    MEET_APPLY_DELETE_FORBIDDEN(20105, "删除会议申请失败", "请确认有相应权限"),
    MEET_REVIEW_FORBIDDEN(20106, "评价会议失败", "请确认有相应权限"),
    MEET_REVIEW_ALREADY(20107, "已经评价过了"),
    MEET_REVIEW_NOT_STARTED(20108, "会议还未开始不能评价"),
    MEET_REVIEW_NOT_FOUND(20109, "评价不存在"),
    MEET_MEMBER_COUNT_LIMIT(20110, "超过人数限制"),
    MEET_APPLY_ENDTIME(20111, "报名时间已过"),
    MEET_APPLY_SELF(20112, "自己的活动还要报名？"),
    MEET_COMMON(20113, "操作失败"),
    FILE_COMMON(20113, "操作失败"),
    USER_TOKEN_REQUIRE(40101, "请求头中缺少token参数"),
    USER_TOKEN_INVALID(40102, "token不正确"),
    USER_NOT_FOUND(40104, "账号不存在"),
    USER_PASSWORD_NOT_MATCH(40105, "密码不正确"),
    REQUEST_IP_INVALID(40106, "请求IP不被信任", "请确保在公司内使用或连接了公司vpn"),
    CLIENT_PARAM_VALID_FAILD(40201, "参数校验异常"),
    MOBILE_ACCESS_FAILED(40202, "手机号认证失败"),
    ACCESS_DENIED(40301, "没有权限"),
    SERVLET_HANDLER_NOT_FOUND(40401, "请求路径不存在"),
    SERVLET_HTTP_METHOD_NOT_SUPPORT(40501, "method不支持"),
    TO_MANY_REQUEST(42900, "请求过于频繁，稍后再试"),
    ENTITY_NOT_FOUND_EXCEPTION(49998, "找不到对象", "检查id是否正确"),
    REPOSITORY_EXCEPTION(49999, "持久化异常"),
    OTHER(50000, "服务器内部错误");

    public Integer code;
    public String message;
    public String description;

    private GlobalExceptionType(Integer code) {
        this.code = code;
    }

    private GlobalExceptionType(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    private GlobalExceptionType(Integer code, String message, String description) {
        this.code = code;
        this.message = message;
        this.description = description;
    }
}

